package com.briup.app02.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.briup.app02.bean.Category;

public interface CategoryMapper {
	
	@Select("select * from cms_category")
	List<Category> selectAll();
	
	@Select("select * from cms_category where id = #{id}")
	Category selectById(long id);
	
	@Insert("insert into cms_category values(null,#{name},#{description},#{no},#{parentId})")
	void insert(Category category);
	
	@Update("update cms_category set name=#{name},description=#{description},no=#{no},parent_id=#{parentId} where id = #{id}")
	void update(Category category);
	
	@Delete("delete form cms_category where id=#{id}")
	void deleteById(long id);
}








